      SUBROUTINE GETMES (MESSNO,ISTOP)
      CHARACTER*50 TEXT(24)
      CHARACTER*50  TXTMP
      INTEGER  ILINES, MESTMP, BORDER
C
      REWIND(19)
C
      ILINES = 0
C
 1000 CONTINUE
C
      READ (19, 5000, END = 1010) MESTMP, TXTMP
 5000 FORMAT(I5,1X,A50)
C
      IF (MESSNO .GT. MESTMP) THEN
         GO TO 1000
      ELSE IF (MESSNO .LT. MESTMP) THEN
         GO TO 1010
      ELSE
        ILINES = ILINES + 1
        TEXT (ILINES) = TXTMP
        GO TO 1000
      ENDIF
C
 1010 CONTINUE
      CALL WINOUT(TEXT,ILINES,ISTOP)
      RETURN
      END
